local fenghan = fk.CreateSkill{
  name = "steam__fenghan",
}

fenghan:addEffect("active", {
  anim_type = "offensive",
  prompt = "#steam__fenghan",
  card_num = 0,
  target_num = 1,
  can_use = function(self, player)
    return player:usedSkillTimes(fenghan.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected)
    local card = Fk:cloneCard("daggar_in_smile")
    card.skillName = fenghan.name
    return card.skill:modTargetFilter(player, to_select, selected, card, { bypass_times = true })
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local card = Fk:cloneCard("daggar_in_smile")
    card.skillName = fenghan.name
    local use = {
      from = player,
      tos = {player},
      card = card,
      
    }
    room:useCard(use)
    local use2 = {
      from = player,
      tos = {target},
      card = card,
      
    }
    room:useCard(use2)

  end,
})


-- 改为造成冰冻伤害
fenghan:addEffect(fk.DamageCaused, {
  can_refresh = function(self, event, target, player, data)
    return player:hasSkill(self.name) and data.card and data.card.name == "daggar_in_smile" and
    data.card.skillName == fenghan.name
  end,
  on_refresh = function(self, event, target, player, data)
    data.damageType = fk.IceDamage 
  end,
})

Fk:loadTranslationTable{
  ["steam__fenghan"] = "讽寒",
  [":steam__fenghan"] = "出牌阶段限一次，你可以视为对你与一名其他角色使用一张改为造成冰冻伤害的【笑里藏刀】。",
  ["#steam__fenghan-target"] = "讽寒：请选择一名其他角色",
  ["@steam__fenghan_used"] = "讽寒已用",
  ["#steam__fenghan"]="讽寒：你可以视为对你与一名其他角色使用一张改为造成冰冻伤害的【笑里藏刀】",
}

return fenghan 